#include <iostream>
#include "vectorfunctions.h"
float average_p(float x[],int l, int p)
{
	int i;
	float sum=0;
	for (i=0; i<l; i++)
		if(x[i]!=p)
			sum += x[i];
return sum/(l-1);
}
void iaverage(float x[],int l, float s[])
{
	int i;
	for (i=0; i<l; i++)
		s[i]=average_p(x, l, x[i]);
}

int main()
{
	int l, m;
	float x[100], s[100];
	cout<<"Number of elements : ";
	cin>>l;
	readVector(x, l);
	iaverage(x, l, s);
	printVector(s, l);
return 0;
}
